package com.samuel.learning.multithread.interview;

import java.util.stream.IntStream;

/**
 * 分析下 start run 方法
 */
public class ThreadDemo {


    /**
     *
     * @param args
     */

    public static void main(String[] args) {
//        Thread thread = new Thread(()->{
//            System.out.println("I'm run function");
//        });
//
//        thread.start();
//        thread.start();


        IntStream.range(0,5).boxed().map(i-> new Thread(()-> System.out.println(Thread.currentThread().getName()))).forEach(Thread::start);

    }





}
